const { Sequelize } = require('sequelize');
const path = require('path');

// 使用SQLite作为数据库
const sequelize = new Sequelize({
  dialect: 'sqlite',
  storage: path.join(__dirname, '../../database.sqlite'),
  logging: false
});

const db = {};

db.Sequelize = Sequelize;
db.sequelize = sequelize;

// 引入模型
db.FileMetadata = require('./file-metadata.model')(sequelize, Sequelize);

module.exports = db; 